<div class="artifact">
  <%= scope[:var_form].fields_for com.thoughtworks.go.config.JobConfig::ARTIFACT_CONFIGS, scope[:builtin_artifact], :index => "" do |artifact_form| %>
    <div class="row expanded">
      <div class="columns medium-2 large-2"><h4 class="type">Type</h4>
        <span class="contextual_help has_go_tip_right" title="There are 3 types of artifacts - build, test and external. When 'Test Artifact' is selected, Go will use this artifact to generate a test report. Test information is placed in the Failures and Test sub-tabs. Test results from multiple jobs are aggregated on the stage detail pages. This allows you to see the results of tests from both functional and unit tests even if they are run in different jobs. When artifact type external is selected, you can configure the external artifact store to which you can push an artifact." />
      </div>
      <div class="columns medium-3 large-3"><h4 class="src">Source</h4>
        <span class="contextual_help has_go_tip_right" title="The file or folders to publish to the server. Go will only upload files that are in the working directory of the job. You can use wildcards to specify the files and folders to upload (** means any path, * means any file or folder name)." />
      </div>
      <div class="columns medium-3 large-3 end"><h4 class="dest">Destination</h4>
        <span class="contextual_help has_go_tip_right" title="The destination is relative to the artifacts folder of the current instance on the server side. If it is not specified, the artifact will be stored in the root of the artifacts directory" />
      </div>
    </div>
    <div class="row expanded">
      <div class="name_value_cell columns medium-2 large-2">
        <%= artifact_form.label scope[:builtin_artifact].getArtifactTypeValue, {:class => "type_label"} -%>
        <%= artifact_form.hidden_field "artifactTypeValue", :value => scope[:builtin_artifact].getArtifactTypeValue, :class => "form_input artifact_source", :id => nil -%>
      </div>

      <div class="name_value_cell columns medium-3 large-3">
        <%= artifact_form.text_field "source", :class => "form_input artifact_source", :id => nil -%>
        <%= error_message_on(scope[:builtin_artifact], "source", :css_class => "form_error") %>
      </div>
      <div class="name_value_cell columns medium-3 large-3">
        <%= artifact_form.text_field "destination", :class => "form_input artifact_destination", :id => nil -%>
        <%= error_message_on(scope[:builtin_artifact], "destination", :css_class => "form_error") %>
      </div>
      <% if @is_config_repo_pipeline %>
        <div class="name_value_cell columns medium-4 large-4 end">
        </div>
      <% else %>
        <div class="name_value_cell columns medium-4 large-4 end">
          <span class="icon_remove delete_artifact" />
        </div>
    <% end %>
    </div>
  <% end %>
</div>
